package com.example.task11v27window;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Locale;

public class DateFormatter {
    public static void main(String[] args) {
        LocalDate date = LocalDate.of(2017, 9, 1);
        String pattern = "dd yyyy MMMM";

        String formattedDate = formatDate(date, pattern);
        System.out.println(formattedDate);
    }

    public static String formatDate(LocalDate date, String pattern) {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern, new Locale("ru"));
        return date.format(formatter);
    }
}
